﻿<UserControl x:Class="SeqcosGui.Dialog.IoUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style x:Key="ParserComboBox" TargetType="{x:Type ComboBox}">
            <Setter Property="Width" Value="100"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="Margin" Value="4,0,0,0"/>
        </Style>
    </UserControl.Resources>
    <StackPanel>
        <!-- Input -->
        <GroupBox Header="Input">
            <StackPanel>
                <TextBlock Text="{DynamicResource IODialog_InputFilename}" TextWrapping="Wrap" Margin="0,10,0,0" />
                <Grid MinHeight="32" MaxHeight="175">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="3*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBox Name="textInputFilename" Margin="4,6" IsReadOnly="True">
                        <TextBox.Text>
                            <Binding Path="InputFilename" ElementName="This" UpdateSourceTrigger="PropertyChanged">
                                <Binding.ValidationRules>
                                    <ExceptionValidationRule/>
                                </Binding.ValidationRules>
                            </Binding>
                        </TextBox.Text>
                    </TextBox>
                    <Button Grid.Column="1" ToolTipService.ShowOnDisabled="True" x:Name="btnBrowseForInput" ToolTip="{DynamicResource OpenFileDialog_BrowseToolTip}" Content="{DynamicResource OpenFileDialog_Browse}" Height="25" Margin="0,0,4,0" IsEnabled="True" Click="OnBrowseInputButtonClick" />
                </Grid>

                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,4,0,0">
                    <TextBlock Text="{DynamicResource OpenFileDialog_ParserType}" TextWrapping="Wrap" HorizontalAlignment="Right" VerticalAlignment="Center" />
                    <ComboBox x:Name="comboInputParserType" IsSynchronizedWithCurrentItem="True" IsEnabled="False" SelectionChanged="OnParserInputSelectionChanged" Style="{StaticResource ParserComboBox}" />
                </StackPanel>
                
                <!--
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,4,0,0">
                    <TextBlock Text="{DynamicResource OpenFileDialog_FastQFormatType}" TextWrapping="Wrap" HorizontalAlignment="Right" VerticalAlignment="Center" />
                    <ComboBox x:Name="comboInputFastqType" IsSynchronizedWithCurrentItem="True" IsEnabled="False" Style="{StaticResource ParserComboBox}" />
                </StackPanel>
                -->
            </StackPanel>
        </GroupBox>

        <!-- Output -->
        <GroupBox Header="Output">
            <StackPanel>
                <TextBlock Text="{DynamicResource IODialog_OutputFilename}" TextWrapping="Wrap" Margin="0,10,0,0" />
                <Grid MinHeight="32" MaxHeight="175">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="3*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBox Name="textOutputFilename" Margin="4,6">
                        <TextBox.Text>
                            <Binding Path="OutputFilename" ElementName="This" UpdateSourceTrigger="PropertyChanged" ValidatesOnExceptions="True" ValidatesOnDataErrors="True"/>
                        </TextBox.Text>
                    </TextBox>
                    <Button Grid.Column="1" ToolTipService.ShowOnDisabled="True" x:Name="btnBrowseForOutput" Content="{DynamicResource OpenFileDialog_Browse}" Height="25" Margin="0,0,4,0" IsEnabled="True" Click="OnBrowseOutputButtonClick" />
                </Grid>
        
                <!-- Discarded -->
                <TextBlock Text="{DynamicResource IODialog_DiscardedFilename}" TextWrapping="Wrap" Margin="0,10,0,0" />
                <Grid MinHeight="32" MaxHeight="175">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="3*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBox Name="textDiscardedFilename" Margin="4,6" IsEnabled="False" />
                    <Button Grid.Column="1" ToolTipService.ShowOnDisabled="True" x:Name="btnBrowseForDiscarded" Content="{DynamicResource OpenFileDialog_Browse}" Height="25" Margin="0,0,4,0" IsEnabled="False" Click="OnBrowseDiscardButtonClick" />
                </Grid>

                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,4,0,0">
                    <TextBlock Text="{DynamicResource OpenFileDialog_ParserType}" TextWrapping="Wrap" HorizontalAlignment="Right" VerticalAlignment="Center" />
                    <ComboBox x:Name="comboOutputParserType" IsSynchronizedWithCurrentItem="True" IsEnabled="False" SelectionChanged="OnParserOutputSelectionChanged" Style="{StaticResource ParserComboBox}" />
                </StackPanel>

            </StackPanel>
        </GroupBox>
    </StackPanel>
</UserControl>
